home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 June
/
ccd0605.iso
/
Software
/
Freeware
/
Programare
/
highlight
/
highlight-W32GUI-2.2-10b-Setup.exe
/
{app}
/
src
/
documentstyle.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-10-20
|
4KB
|
128 lines
/***************************************************************************
documentstyle.h - description
-------------------
begin : Son Nov 10 2002
copyright : (C) 2002 by Andre Simon
email : andre.simon1@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef DOCUMENTSTYLE_H
#define DOCUMENTSTYLE_H
#include <string>
#include <iostream>
#include "configurationreader.h"
#include "elementstyle.h"
#include "stylecolour.h"
using namespace std;
namespace highlight {
/** maps keyword class names and the corresponding formatting information*/
typedef map <string, ElementStyle*> KeywordStyles;
/** iterator for keyword styles*/
typedef KeywordStyles::iterator KSIterator;
/** \brief Contains information about document formatting properties.
* @author Andre Simon
*/
class DocumentStyle
{
private:
ElementStyle comment, slcomment, str, dstr,
escapeChar, number, directive, line, symbol;
ElementStyle defaultElem;
StyleColour bgColour;
string fontsize;
bool fileFound;
KeywordStyles keywordStyles;
public:
/** Constructor
\param styleDefinitionPath Style definition path */
DocumentStyle(const string & styleDefinitionPath);
DocumentStyle();
~DocumentStyle();
/** load sytle definition
\param styleDefinitionFile Style definition path
\return True if successfull */
bool load(const string & styleDefinitionFile);
/** \return class names defined in the theme file */
vector <string> getClassNames();
/** \return keyword styles */
KeywordStyles& getKeywordStyles();
/** \return Font size */
string &getFontSize() ;
/** \return Background colour*/
StyleColour& getBgColour();
/** \return Style of default (unrecognized) strings */
ElementStyle & getDefaultStyle() ;
/** \return Comment style*/
ElementStyle & getCommentStyle() ;
/** \return Single line comment style*/
ElementStyle& getSingleLineCommentStyle() ;
/** \return Keyword style*/
ElementStyle & getKeywordStyle() ;
/** \return String style*/
ElementStyle & getStringStyle() ;
/** \return Directive line string style*/
ElementStyle & getDirectiveStringStyle() ;
/** \return Escape character style*/
ElementStyle & getEscapeCharStyle() ;
/** \return Number style*/
ElementStyle & getNumberStyle() ;
/** \return Directive style*/
ElementStyle & getDirectiveStyle() ;
/** \return Type style*/
ElementStyle & getTypeStyle() ;
/** \return Line number style*/
ElementStyle & getLineStyle() ;
/** \return Bracket style*/
ElementStyle & getSymbolStyle() ;
/**
\param className Name of keyword class
\return keyword style of the given className
*/
ElementStyle & getKeywordStyle(const string &className);
/** \return True if language definition was found */
bool found() const ;
};
}
#endif